from django.urls import path
from . import views

app_name = 'products'

urlpatterns = [
    # 产品分类
    path('categories/', views.ProductCategoryListView.as_view(), name='categories'),
    
    # 产品
    path('', views.ProductListView.as_view(), name='product_list'),
    path('<int:pk>/', views.ProductDetailView.as_view(), name='product_detail'),
    path('search/', views.product_search, name='product_search'),
    path('recommendations/', views.product_recommendations, name='product_recommendations'),
    path('<int:product_id>/stats/', views.product_stats, name='product_stats'),
    
    # 产品价格和业绩
    path('<int:product_id>/prices/', views.ProductPriceListView.as_view(), name='product_prices'),
    path('<int:product_id>/performance/', views.ProductPerformanceListView.as_view(), name='product_performance'),
]